home *** CD-ROM | disk | FTP | other *** search
- 0999 0 Origin
- OP 0
- X 0
- Y 0
- Z 0
- 0 Dummy included to reserve read space
- ONE 1 Constant one
- RD OP Read OP, X, Y
- LD OP Load OP
- SU ONE Find difference for test
- BN*+4 If < 1 go to halt
- BZ*+8 If = 1 go to add routine
- SU ONE If > 1 see if it is 2
- BZ*+2 If = 2 go to subtract
- HT0000 If not stop
- LD X Load X
- SU Y Subtract Y
- ST Z Store at Z
- BU*+4 Go to print
- LD X Load X
- AD Y Add Y
- ST Z Store at Z
- PC OP Print
- BU*-16 Go back to start
- EN*-17 End of code with starting location